<?php 
class ControllerUseraccountTindaluu extends Controller { 
	public function index() {
		if (!$this->customer->isLogged()) {
	  		$this->session->data['redirect'] = HTTPS_SERVER . 'index.php?route=account/account';
	  
	  		$this->redirect(HTTPS_SERVER . 'index.php?route=account/login');
    	} 
	
		

      	$this->document->breadcrumbs = array();

      	$this->document->breadcrumbs[] = array(
        	'href'      => HTTP_SERVER . 'index.php?route=common/home',
        	'text'      => $this->language->get('text_home'),
        	'separator' => FALSE
      	); 

      	$this->document->breadcrumbs[] = array(
        	'href'      => HTTPS_SERVER . 'index.php?route=user_account/tindaluu',
        	'text'      => $this->language->get('text_account'),
        	'separator' => $this->language->get('text_separator')
      	);
		
      	
      	
      	$this->language->load('user_account/tindaluu');
		$this->document->title = $this->language->get('heading_title');

    	$this->data['heading_title'] = $this->language->get('heading_title');

    	$this->data['text_quanlydangtin']	 = $this->language->get('text_quanlydangtin');
		$this->data['text_uptintudong']		 = $this->language->get('text_uptintudong');
		$this->data['text_uptinle']			 = $this->language->get('text_uptinle');
    	$this->data['text_tindaluu']		= $this->language->get('text_tindaluu');
    	$this->data['text_doithongtin'] 	= $this->language->get('text_doithongtin');
    	$this->data['text_doimatkhau']	 = $this->language->get('text_doimatkhau');
    	$this->data['text_tinluutru'] 	= $this->language->get('text_tinluutru');
    	$this->data['text_logout']	 = $this->language->get('text_logout');
    	$this->data['text_trangcanhan']	 = $this->language->get('text_trangcanhan');
		

		if (isset($this->session->data['success'])) {
    		$this->data['success'] = $this->session->data['success'];
			
			unset($this->session->data['success']);
		} else {
			$this->data['success'] = '';
		}

    	$this->data['quanlydangtin'] = HTTPS_SERVER . 'index.php?route=user_account/quanlydangtin';
    	$this->data['uptintudong'] = HTTPS_SERVER . 'index.php?route=user_account/uptintudong';
		$this->data['uptinle'] = HTTPS_SERVER . 'index.php?route=user_account/uptinle';
    	$this->data['tindaluu'] = HTTPS_SERVER . 'index.php?route=user_account/tindaluu';
    	$this->data['doithongtin'] = HTTPS_SERVER . 'index.php?route=user_account/doithongtin';
		$this->data['doimatkhau'] = HTTPS_SERVER . 'index.php?route=user_account/doimatkhau';
		$this->data['tinluutru'] = HTTPS_SERVER . 'index.php?route=user_account/tinluutru';
		$this->data['logout'] = HTTPS_SERVER . 'index.php?route=user_account/logout';
		
		/*
		 * css link and image link
		 */
		
		
		
		$this->data['css'] = 'catalog/view/theme/default/stylesheet/user_account/';
		$this->data['image'] = 'catalog/view/theme/default/image/user_account/';
			
		/*
		 * get ID of user
		 */
		
		$id = $this->customer->getId();
		$this->data['CustomerID']= $id;
		
		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/user_account/tindaluu.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/user_account/tindaluu.tpl';
		} else {
			$this->template = 'default/template/user_account/tindaluu.tpl';
		}
		
		$this->children = array(
			'common/column_right',
			'common/footer',
			'common/column_left',
			'common/header'
		);

		$this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));		
  	}
}
?>
